-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proof of concept LSP server #21
Conversation
@megalithic I have an issue following links with coc.nvim, I described it here neoclide/coc.nvim#3010. Would you mind checking if you experience the same thing on your environment? Here's a macOS build with the LSP features enabled |
Extremely excited about this! I use the built in neovim lsp client, so i'll |
Okay let me know how it goes with the builtin one too. And if you have installation instructions for it I could add them to the doc as well 👍 |
@mickael-menu -> here's the instructions for nvim-lspconfig setup: local lspconfig = require('lspconfig')
local configs = require('lspconfig/configs')
configs.zk = {
default_config = {
cmd = {'zk', 'lsp', '--log', '/tmp/zk-lsp.log'},
filetypes = {'markdown'},
root_dir = function()
return vim.loop.cwd()
end,
settings = {}
};
}
lspconfig.zk.setup({ on_attach = function(client, buffer)
-- some custom on_attach function for doing keybindings and other things..
-- see: https://github.com/neovim/nvim-lspconfig#keybindings-and-completion
end }) |
@mickael-menu it's looking like we're stuck without certain lsp implementations |
Great news, the maintainer of coc.nvim fixed the bug really quickly and following links works properly with the latest version now 🎉 Thanks a lot for the nvim-lspconfig 👍 That's a shame I see that the built-in LSP nvim API offers some additional features for extensions too, that might be useful for more advanced use cases. (On an unrelated note, you got me into dotfiles! I just got a new MacBook M1 and I'm taking this opportunity to streamline my startup scripts and share my config files with |
@megalithic Here's a new build with Go to definition to follow a link. You should be able to map it with: nnoremap <silent> <CR> <cmd>lua vim.lsp.buf.definition()<CR> |
This looks very promising! |
479ddbc
to
ba909db
Compare
I think the feature set is good enough for basic usage. I'll focus on some architectural changes before tackling the other LSP features mentioned in #22 Here are some pre-release builds: (UPDATE: fixed the go to definition with neovim 0.5) |
Integrate a Language Server in
zk
to be used with LSP editors (i.e. neovim).Features
#
and:
trigger characters.[
and WikiLinks with[[
.Pre-release builds
Installation
With coc.nvim, run
:CocConfig
and add the following to yourcoc-settings.json
:While running, you can check the content of
/tmp/zk-lsp.log
to see the JSON-RPC exchange.